﻿using Neural.Data;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;

namespace NNTest
{
    
    
    /// <summary>
    ///This is a test class for DataReaderTest and is intended
    ///to contain all DataReaderTest Unit Tests
    ///</summary>
    [TestClass()]
    public class DataReaderTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for TranslateLine
        ///</summary>
        [TestMethod()]
        public void TranslateLineTest()
        {
            DataReader target = CreateDataReader(); // TODO: Initialize to an appropriate value
            string[] aLine = null; // TODO: Initialize to an appropriate value
            double[] expected = null; // TODO: Initialize to an appropriate value
            double[] actual;
            actual = target.TranslateLine(aLine);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for ScaleLine
        ///</summary>
        [TestMethod()]
        public void ScaleLineTest()
        {
            DataReader target = CreateDataReader(); // TODO: Initialize to an appropriate value
            double[] rawLine = null; // TODO: Initialize to an appropriate value
            double[] expected = null; // TODO: Initialize to an appropriate value
            double[] actual;
            actual = target.ScaleLine(rawLine);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for ReadValues
        ///</summary>
        [TestMethod()]
        public void ReadValuesTest()
        {
            DataReader target = CreateDataReader(); // TODO: Initialize to an appropriate value
            List<Dictionary<string, double>> expected = null; // TODO: Initialize to an appropriate value
            List<Dictionary<string, double>> actual;
            actual = target.ReadValues();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for NameValues
        ///</summary>
        [TestMethod()]
        public void NameValuesTest()
        {
            DataReader target = CreateDataReader(); // TODO: Initialize to an appropriate value
            double[] scaledLine = {0.5, 0.5}; // TODO: Initialize to an appropriate value
            Dictionary<string, double> expected = new Dictionary<string,double>(); // TODO: Initialize to an appropriate value
            Dictionary<string, double> actual;

            expected["Foo"] = 0.5; expected["Bar"] = 0.5;

            target.DefineColumn("Foo", new FactorScaler(1.0));
            target.DefineColumn("Bar", new FactorScaler(1.0));
            actual = target.NameValues(scaledLine);
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for DefineTranslatedInputField
        ///</summary>
        [TestMethod()]
        public void DefineTranslatedInputFieldTest()
        {
            DataReader target = CreateDataReader(); // TODO: Initialize to an appropriate value
            string name = string.Empty; // TODO: Initialize to an appropriate value
            Translator translator = null; // TODO: Initialize to an appropriate value
            target.DefineTranslatedInputField(name, translator);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for DefineRealInputField
        ///</summary>
        [TestMethod()]
        public void DefineRealInputFieldTest()
        {
            DataReader target = CreateDataReader(); // TODO: Initialize to an appropriate value
            string name = string.Empty; // TODO: Initialize to an appropriate value
            target.DefineRealInputField(name);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for DefineColumn
        ///</summary>
        [TestMethod()]
        public void DefineColumnTest1()
        {
            DataReader target = CreateDataReader(); // TODO: Initialize to an appropriate value
            string name = "Foo"; // TODO: Initialize to an appropriate value
            Scaler scaler = new FactorScaler(1.0); // TODO: Initialize to an appropriate value
            target.DefineColumn(name, scaler);

            Assert.IsTrue(true);
        }

        internal virtual DataReader CreateDataReader()
        {
            // TODO: Instantiate an appropriate concrete class.
            DataReader target = new FileDataReader();
            return target;
        }

        /// <summary>
        ///A test for DefineColumn
        ///</summary>
        [TestMethod()]
        public void DefineColumnTest()
        {
            DataReader target = CreateDataReader(); // TODO: Initialize to an appropriate value
            string name = string.Empty; // TODO: Initialize to an appropriate value
            target.DefineColumn(name);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
    }
}
